<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>23_CSS3-新增背景属性-background-size</title>
        <style>
            div {
                width: 50%;
                height: 400px;

                padding: 20px;
                border: 10px dashed red;

                background-image: url(./img/bg03.jpg);
                background-repeat: no-repeat;

                /* 具体像素值 */
                background-size: 400px 300px;

                /* 百分比 */
                background-size: 150% 150%;

                background-size: auto;

                background-size: cover;
                background-size: contain;

            }
        </style>
    </head>
    <body>
        <div></div>
    </body>
</html>